package com.javaweb.service.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.javaweb.common.BusinessConstants;
import lombok.*;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
 * @desc:
 * @author: Ping
 * @date: 2024/10/17 9:39
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Setter
@Accessors(chain = true)
@Builder
public class UserDto implements Serializable {
    private static final long serialVersionUID = 1L;
    private String id ;
    @NotBlank(message = "用户名不能为空")
    private String username;
    @NotBlank(message = "密码不能为空")
    private String password;
    private String gender ;
    @Email(message = "邮箱格式不正确")
    @NotBlank(message = "邮箱不能为空")
    private String email ;
    /**
     * 用户启用状态
     */
    private String status ;
    @JsonFormat(pattern = BusinessConstants.DATE_FORMAT)
//    @DateTimeFormat(pattern = BusinessConstants.DATE_FORMAT)
    private Date createTime ;





}






